home *** CD-ROM | disk | FTP | other *** search
- class Heroes.Score extends MovieClip
- {
- var currentScore_lz;
- var currentScore = 0;
- var frameCounter = 0;
- function Score()
- {
- super();
- this.setScore(Heroes.Tools.getScore());
- }
- function onEnterFrame()
- {
- this.frameCounter = this.frameCounter + 1;
- if(this.frameCounter == 2)
- {
- this.setScore(this.currentScore);
- }
- }
- function addScore(extraScore)
- {
- this.currentScore += extraScore;
- this.currentScore_lz.setNumber(this.currentScore);
- this.play();
- }
- function setScore(newScore)
- {
- this.currentScore = newScore;
- this.currentScore_lz.setNumber(this.currentScore);
- }
- function getScore()
- {
- return this.currentScore;
- }
- }
-